<?php
/**
 * Created by PhpStorm.
 * User: vanity
 * Date: 2017/5/4
 * Time: 14:13
 */
namespace App\Services;

use Illuminate\Support\Facades\DB;

class categoryService
{
    public function getCateMenu()
    {
        $category = DB::table('article_category')->where('id','>','1')->get();
        $html = '';
        foreach($category as $value){
            $html .= '<a href="/category/'.$value->id.'"><button type="button" class="btn btn-default margin_five">'.$value->name.'</button></a>';
        }
        return $html;

    }
}